const http =require('http')

http.createServer((req,res)=>{
    // console.log(req.headers);
    // res.end('后端返回数据')
    if (req.url === '/home') {
        //做数据库的链接
        //执行sql语句

        res.end('首页')
    }
}).listen(3000,()=>{
    console.log('Server running at http://localhost:3000/');
    
})